<template>
<div>
  <div v-for="p in tableData">
    <font color="gray">{{p.createDate}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单号：</font>{{p.orderNum}}
        <el-table :data="p.productList" style="width: 100%">
          <el-table-column  width="180">
            <template slot-scope="scope">
              <img :src="scope.row.pimg" width="100px" />
            </template>
          </el-table-column>
          <el-table-column  prop="pname"> </el-table-column>
        </el-table>
  </div>

</div>
</template>

<script>
    export default {
        name: "Orders",
        data(){
          return{
              tableData:''
          }
        },
        created() {
            this.queryOrderList();
        },
        methods:{
            queryOrderList(){
                var vm=this;
                this.axios.get("http://localhost:8086/order/queryOrderList?userId="+this.$store.getters.getUser.userId).then(function (res) {
                    console.log(res.data.data)
                    vm.tableData=res.data.data;
                })
            }
        }

    }
</script>

<style scoped>

</style>
